package cn.org.guhao.practice.labs.api;

import cn.org.guhao.practice.labs.domain.vo.User;
import cn.org.guhao.practice.labs.trace.TraceIns;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TraceController
 *
 * @author guhao
 * @since 2020/7/29
 */
@RestController
@RequestMapping("/trace")
public class TraceController {

  private final TraceIns traceIns;

  public TraceController(TraceIns traceIns) {
    this.traceIns = traceIns;
  }

  @GetMapping(value = "/hello/{username}/{age}")
  public User helloBoy(@PathVariable(value = "username") String username,
                       @PathVariable(value = "age") Integer age){
    return traceIns.helloBoy(username,age);
  }

}
